/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufscar.compiladores.ast;

/**
 *
 * @author takeshi
 */
public class WhileCommand extends Command{
    
    private Expr expr;
    private Command command;

    public WhileCommand(Expr expr, Command command) {
        this.expr = expr;
        this.command = command;
    }
    
    @Override
    public void genC(PW pw) {
//        pw.print("while ( ");
//        expr.genC(pw, false);
//        pw.out.println(" )");
//        if (statement instanceof CompositeStatement) {
//            statement.genC(pw);
//        } else {
//            pw.add();
//            statement.genC(pw);
//            pw.sub();
//        }
    }
}
